#!/bin/bash
# configure interface
interfaz1=`ifconfig | egrep "eth." -o | head -1`
echo "auto lo" > "/etc/network/interfaces"
echo "iface lo inet loopback" >> "/etc/network/interfaces"

echo "auto $interfaz1" >> "/etc/network/interfaces"
echo "iface $interfaz1 inet dhcp" >> "/etc/network/interfaces"

# Restarting network in order to take new config
/etc/init.d/networking restart


	
